home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
shells
/
kiss-0.11
/
kiss-0
/
kiss
/
src
/
dohistory.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-23
|
427b
|
24 lines
#include "kiss.h"
int dohistory (Stringstack s)
{
register int
i,
j;
if (s.nstr > 2)
return (warning ("history command takes one optional argument"));
for (i = 0; i < nhislist; i++)
if (s.nstr == 1 ||
! strncmp (s.str [1], hislist [i].str [0], strlen (s.str [1]))
)
{
for (j = 0; j < hislist [i].nstr; j++)
printf (" %s", hislist [i].str [j]);
putchar ('\n');
}
return (0);
}